package com.gzhryc.shared_device.oem.code.agent.dao;

import com.gzhryc.jdbc.BaseDao;
import com.gzhryc.jdbc.Query;
import com.gzhryc.shared_device.oem.code.agent.dao.db.AgentLevel;

import java.sql.SQLException;

public class AgentLevelDao extends BaseDao<AgentLevel> {

    public AgentLevelDao(String jdbcKey){
        super(jdbcKey);
    }

    public Integer getMaxNum() throws SQLException {
        String sql = "SELECT MAX(num) FROM " + this.tableName;
        Query query = new Query(sql);
        return this.jdbcHelper.getFirstField(query,Integer.class);
    }
}
